package controller.priv;

import controller.MyCoolServlet;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import model.User;

public class SignOutServlet extends MyCoolServlet {

    @Override
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
            HttpSession s = request.getSession();
            User user = (User) s.getAttribute("usuario");
            user.setUsuario(null);
            s.setAttribute("usuario", user);
            gotoURL(index, request, response);
    }
}